import numpy as np

signal = np.array([4, 3, 2, 1])
print("signal:", signal)

kernel = np.array([3, 2, 1])
print("kernel:", kernel)

convolution_full_result = np.convolve(signal, kernel, mode='full')
print("convolution full  result:", convolution_full_result)

convolution_same_result = np.convolve(signal, kernel, mode='same')
print("convolution same  result:", convolution_same_result)

convolution_valid_result = np.convolve(signal, kernel, mode='valid')
print("convolution valid result:", convolution_valid_result)

